<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>rileft - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / rileft<br />
  <a name="top"></a><h1>rileft - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="rileft.html" name="rileft.txt">rileft.txt</a>&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2006 Apr 24<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Identifier">VIM REFERENCE MANUAL&nbsp;&nbsp;&nbsp;&nbsp;by Avner Lottem</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updated by Nadim Shaikli<br>
<br>
<br>
Right to Left display mode for Vim&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="rileft.html#rileft" name="rileft">rileft</a><br>
<br>
<br>
These functions were originally created by Avner Lottem:<br>
&nbsp;&nbsp; E-mail: alottem@iil.intel.com<br>
&nbsp;&nbsp; Phone:&nbsp;&nbsp;+972-4-8307322<br>
<br>
<span class="Special">{Vi does not have any of these commands}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="rileft.html#E26" name="E26">E26</a><br>
<span class="Special">{only available when compiled with the&nbsp;</span><a class="Identifier" href="various.html#+rightleft">+rightleft</a><span class="Special">&nbsp;feature}</span><br>
<br>
<br>
Introduction<br>
<span class="PreProc">------------</span><br>
Some languages such as Arabic, Farsi, Hebrew (among others) require the<br>
ability to display their text from right-to-left.&nbsp;&nbsp;Files in those languages<br>
are stored conventionally and the right-to-left requirement is only a<br>
function of the display engine (per the Unicode specification).&nbsp;&nbsp;In<br>
right-to-left oriented files the characters appear on the screen from<br>
right to left.<br>
<br>
Bidirectionality (or bidi for short) is what Unicode offers as a full<br>
solution to these languages.&nbsp;&nbsp;Bidi offers the user the ability to view<br>
both right-to-left as well as left-to-right text properly at the same time<br>
within the same window.&nbsp;&nbsp;Vim currently, due to simplicity, does not offer<br>
bidi and is merely opting to present a functional means to display/enter/use<br>
right-to-left languages.&nbsp;&nbsp;An older hybrid solution in which direction is<br>
encoded for every character (or group of characters) are not supported either<br>
as this kind of support is out of the scope of a simple addition to an<br>
existing editor (and it's not sanctioned by Unicode either).<br>
<br>
<br>
Highlights<br>
<span class="PreProc">----------</span><br>
o&nbsp;&nbsp;Editing left-to-right files as in the original Vim, no change.<br>
<br>
o&nbsp;&nbsp;Viewing and editing files in right-to-left windows.&nbsp;&nbsp;File orientation<br>
&nbsp;&nbsp; is per window, so it is possible to view the same file in right-to-left<br>
&nbsp;&nbsp; and left-to-right modes, simultaneously.&nbsp;&nbsp;(Useful for editing mixed files<br>
&nbsp;&nbsp; in which both right-to-left and left-to-right text exist).<br>
<br>
o&nbsp;&nbsp;Compatibility to the original Vim.&nbsp;&nbsp;Almost all features work in<br>
&nbsp;&nbsp; right-to-left mode (see Bugs below).<br>
<br>
o&nbsp;&nbsp;Backing from reverse insert mode to the correct place in the file<br>
&nbsp;&nbsp; (if possible).<br>
<br>
o&nbsp;&nbsp;No special terminal with right-to-left capabilities is required.&nbsp;&nbsp;The<br>
&nbsp;&nbsp; right-to-left changes are completely hardware independent.<br>
<br>
o&nbsp;&nbsp;Many languages use and require right-to-left support.&nbsp;&nbsp;These languages<br>
&nbsp;&nbsp; can quite easily be supported given the inclusion of their required<br>
&nbsp;&nbsp; keyboard mappings and some possible minor code change.&nbsp;&nbsp;Some of the<br>
&nbsp;&nbsp; current supported languages include -&nbsp;<a class="Identifier" href="arabic.html">arabic.txt</a>,&nbsp;<a class="Identifier" href="farsi.html">farsi.txt</a>&nbsp;and<br>
&nbsp;&nbsp;&nbsp;<a class="Identifier" href="hebrew.html">hebrew.txt</a>.<br>
<br>
<br>
Of Interest...<br>
<span class="PreProc">--------------</span><br>
<br>
o&nbsp;&nbsp;Invocations<br>
&nbsp;&nbsp; -----------<br>
&nbsp;&nbsp; +&nbsp;<a class="Type" href="options.html#'rightleft'">'rightleft'</a>&nbsp;(<a class="Type" href="options.html#'rl'">'rl'</a>) sets window orientation to right-to-left.<br>
&nbsp;&nbsp; +&nbsp;<a class="Type" href="options.html#'delcombine'">'delcombine'</a>&nbsp;(<a class="Type" href="options.html#'deco'">'deco'</a>), boolean, if editing UTF-8 encoded languages,<br>
&nbsp;&nbsp;&nbsp;&nbsp; allows one to remove a composing character which gets superimposed<br>
&nbsp;&nbsp;&nbsp;&nbsp; on those that proceeded them (some languages require this).<br>
&nbsp;&nbsp; +&nbsp;<a class="Type" href="options.html#'rightleftcmd'">'rightleftcmd'</a>&nbsp;(<a class="Type" href="options.html#'rlc'">'rlc'</a>) sets the command-line within certain modes<br>
&nbsp;&nbsp;&nbsp;&nbsp; (such as search) to be utilized in right-to-left orientation as well.<br>
<br>
o&nbsp;&nbsp;Typing backwards&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="rileft.html#ins-reverse" name="ins-reverse">ins-reverse</a><br>
&nbsp;&nbsp; ----------------<br>
&nbsp;&nbsp; In lieu of using full-fledged the&nbsp;<a class="Type" href="options.html#'rightleft'">'rightleft'</a>&nbsp;option, one can opt for<br>
&nbsp;&nbsp; reverse insertion.&nbsp;&nbsp;When the&nbsp;<a class="Type" href="options.html#'revins'">'revins'</a>&nbsp;(reverse insert) option is set,<br>
&nbsp;&nbsp; inserting happens backwards.&nbsp;&nbsp;This can be used to type right-to-left<br>
&nbsp;&nbsp; text.&nbsp;&nbsp;When inserting characters the cursor is not moved and the text<br>
&nbsp;&nbsp; moves rightwards.&nbsp;&nbsp;A&nbsp;<span class="Special">&lt;BS&gt;</span>&nbsp;deletes the character under the cursor.<br>
&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-W</span>&nbsp;and&nbsp;<span class="Special">CTRL-U</span>&nbsp;also work in the opposite direction.&nbsp;&nbsp;<span class="Special">&lt;BS&gt;</span>,&nbsp;<span class="Special">CTRL-W</span><br>
&nbsp;&nbsp; and&nbsp;<span class="Special">CTRL-U</span>&nbsp;do not stop at the start of insert or end of line, no matter<br>
&nbsp;&nbsp; how the&nbsp;<a class="Type" href="options.html#'backspace'">'backspace'</a>&nbsp;option is set.<br>
<br>
&nbsp;&nbsp; There is no reverse replace mode (yet).<br>
<br>
&nbsp;&nbsp; If the&nbsp;<a class="Type" href="options.html#'showmode'">'showmode'</a>&nbsp;option is set, &quot;-- REVERSE INSERT --&quot; will be shown<br>
&nbsp;&nbsp; in the status line when reverse Insert mode is active.<br>
<br>
o&nbsp;&nbsp;Pasting when in a rightleft window<br>
&nbsp;&nbsp; ----------------------------------<br>
&nbsp;&nbsp; When cutting text with the mouse and pasting it in a rightleft window<br>
&nbsp;&nbsp; the text will be reversed, because the characters come from the cut buffer<br>
&nbsp;&nbsp; from the left to the right, while inserted in the file from the right to<br>
&nbsp;&nbsp; the left.&nbsp;&nbsp; In order to avoid it, toggle&nbsp;<a class="Type" href="options.html#'revins'">'revins'</a>&nbsp;before pasting.<br>
<br>
<br>
Bugs<br>
----<br>
o&nbsp;&nbsp;Does not handle&nbsp;<span class="Special">CTRL-A</span>&nbsp;and&nbsp;<span class="Special">CTRL-X</span>&nbsp;commands (add and subtract) correctly<br>
&nbsp;&nbsp; when in rightleft window.<br>
<br>
o&nbsp;&nbsp;Does not support reverse insert and rightleft modes on the command-line.<br>
&nbsp;&nbsp; However, functionality of the editor is not reduced, because it is<br>
&nbsp;&nbsp; possible to enter mappings, abbreviations and searches typed from the<br>
&nbsp;&nbsp; left to the right on the command-line.<br>
<br>
o&nbsp;&nbsp;Somewhat slower in right-to-left mode, because right-to-left motion is<br>
&nbsp;&nbsp; emulated inside Vim, not by the controlling terminal.<br>
<br>
o&nbsp;&nbsp;When the Athena GUI is used, the bottom scrollbar works in the wrong<br>
&nbsp;&nbsp; direction.&nbsp;&nbsp;This is difficult to fix.<br>
<br>
o&nbsp;&nbsp;When both&nbsp;<a class="Type" href="options.html#'rightleft'">'rightleft'</a>&nbsp;and&nbsp;<a class="Type" href="options.html#'revins'">'revins'</a>&nbsp;are on:&nbsp;<a class="Type" href="options.html#'textwidth'">'textwidth'</a>&nbsp;does not work.<br>
&nbsp;&nbsp; Lines do not wrap at all; you just get a single, long line.<br>
<br>
o&nbsp;&nbsp;There is no full bidirectionality (bidi) support.<br>
<br>
<br>
&nbsp;vim:tw=78:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
